package com.autumn.scheduler.api.services.dto.input;

import java.io.Serializable;
import java.util.Date;

import org.hibernate.validator.constraints.Length;

import com.autumn.scheduler.api.job.IJobTriggerBuilderInfo;
import com.autumn.validation.constraints.NotNullOrBlank;

/**
 * 输入抽象
 * 
 * @author 老码农 2018-03-21 00:23:42
 */
public abstract class AbstractAutumnJobDetailsInput implements Serializable, IJobTriggerBuilderInfo {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3797548926354905099L;
	private Date firstStartTime;
	@NotNullOrBlank(message = "任务名称不能为空")
	@Length(message = "任务名称长度超过200", max = 200)
	private String jobFriendlyName;
	@NotNullOrBlank(message = "队列名称不能为空")
	@Length(message = "队列名称长度超过100", max = 100)
	private String jobQueueName;
	private Long executeNumbers;
	private Integer executeOperation;
	@NotNullOrBlank(message = "触发器类型不能为空")
	@Length(message = "触发器类型长度超过8", max = 8)
	private String triggerType;
	private Integer timeInterval;
	@Length(message = "时间单位长度超过8", max = 20)
	private String timeIntervalUnit;
	@Length(message = "Cron 表达式长度超过120", max = 120)
	private String cronExpression;
	@Length(message = "任务备注长度超过250", max = 250)
	private String jobDescription;
	@Length(message = "触发器备注长度超过250", max = 250)
	private String triggerDescription;
	private String executeParameter;

	public String getJobFriendlyName() {
		return jobFriendlyName;
	}

	public void setJobFriendlyName(String jobFriendlyName) {
		this.jobFriendlyName = jobFriendlyName;
	}

	public String getJobQueueName() {
		return jobQueueName;
	}

	public void setJobQueueName(String jobQueueName) {
		this.jobQueueName = jobQueueName;
	}

	public Long getExecuteNumbers() {
		return executeNumbers;
	}

	public void setExecuteNumbers(Long executeNumbers) {
		this.executeNumbers = executeNumbers;
	}

	public Integer getExecuteOperation() {
		return executeOperation;
	}

	public void setExecuteOperation(Integer executeOperation) {
		this.executeOperation = executeOperation;
	}

	@Override
	public String getTriggerType() {
		return triggerType;
	}

	@Override
	public void setTriggerType(String triggerType) {
		this.triggerType = triggerType;
	}

	@Override
	public Integer getTimeInterval() {
		return timeInterval;
	}

	@Override
	public void setTimeInterval(Integer timeInterval) {
		this.timeInterval = timeInterval;
	}

	@Override
	public String getTimeIntervalUnit() {
		return timeIntervalUnit;
	}

	@Override
	public void setTimeIntervalUnit(String timeIntervalUnit) {
		this.timeIntervalUnit = timeIntervalUnit;
	}

	@Override
	public String getCronExpression() {
		return cronExpression;
	}

	@Override
	public void setCronExpression(String cronExpression) {
		this.cronExpression = cronExpression;
	}

	public String getJobDescription() {
		return jobDescription;
	}

	public void setJobDescription(String jobDescription) {
		this.jobDescription = jobDescription;
	}

	public String getTriggerDescription() {
		return triggerDescription;
	}

	public void setTriggerDescription(String triggerDescription) {
		this.triggerDescription = triggerDescription;
	}

	public String getExecuteParameter() {
		return executeParameter;
	}

	public void setExecuteParameter(String executeParameter) {
		this.executeParameter = executeParameter;
	}

	public Date getFirstStartTime() {
		return firstStartTime;
	}

	public void setFirstStartTime(Date firstStartTime) {
		this.firstStartTime = firstStartTime;
	}
}
